package com.sc.ktapplication.module.activity

import android.os.Bundle
import android.view.View
import com.sc.ktapplication.R
import com.sc.ktapplication.common.base.BaseActivity
import com.sc.ktapplication.common.util.PackageUtils
import com.sc.ktapplication.common.util.versionmanager.VersionUtils
import kotlinx.android.synthetic.main.activity_app_update.*
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch

class AppUpdateActivity : BaseActivity() {

    override fun getLayoutId(): Int {
        return R.layout.activity_app_update
    }

    override fun showErrorMsg() {
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        txtVersion.text = "当前版本： V " + PackageUtils.getVersionName(applicationContext)


    }


    fun checkUpdate(view: View) {
        VersionUtils.getUpdataInfo(this, true)
    }
}